package com.moxiao.yfjh.module.order.controller.admin.blindTradeOrder.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.moxiao.yfjh.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 相亲交易订单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BlindTradeOrderBaseVO {

    @Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String no;

    @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5103")
    private Long appId;

    @Schema(description = "支付方式：微信、支付宝、银联", requiredMode = Schema.RequiredMode.REQUIRED)
    private String payway;

    @Schema(description = "订单来源终端", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer terminal;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17669")
    private Long userId;

    @Schema(description = "异步通知地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    private String notifyUrl;

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String mobile;

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    private String userName;

    @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED)
    private String userIp;

    @Schema(description = "用户备注", example = "你猜")
    private String userRemark;

    @Schema(description = "开通次数")
    private String openNum;

    @Schema(description = "开通等级")
    private String openLevel;

    @Schema(description = "开通内容")
    private String openContent;

    @Schema(description = "订单状态 0未支付 1已支付", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer status;

    @Schema(description = "购买的商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "21091")
    private Integer productCount;

    @Schema(description = "取消类型", example = "2")
    private Integer cancelType;

    @Schema(description = "商家备注", example = "随便")
    private String remark;

    @Schema(description = "推广人编号", example = "11471")
    private Long brokerageUserId;

    @Schema(description = "支付订单编号", example = "22315")
    private Long payOrderId;

    @Schema(description = "是否已支付：[0:未支付 1:已经支付过]", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Boolean payStatus;

    @Schema(description = "订单支付时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime payTime;

    @Schema(description = "支付成功的支付渠道")
    private String payChannelCode;

    @Schema(description = "订单完成时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime finishTime;

    @Schema(description = "订单取消时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime cancelTime;

    @Schema(description = "商品原价（总），单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "32274")
    private BigDecimal totalPrice;

    @Schema(description = "应付金额（总），单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "28205")
    private BigDecimal payPrice;

    @Schema(description = "退款金额，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "9366")
    private BigDecimal refundPrice;

    @Schema(description = "订单类型 1 会员订单 2 超级推荐订单 3 活动订单 4 红娘订单")
    private Byte orderType;

    @Schema(description = "相亲业务订单订单id：暂时用来存放会员机制")
    private Long orderId;

}
